<template>
	<view class="container">
		<!--没有信息的时候显示-->
		<view class="myorder_no" v-if="rows.length==0">暂无相关信息</view>
		<!--没有信息的时候显示end-->

		<view class="myorder_list" v-for="(item,index) in rows" :key="item.id">
			<view class="myorder_ct">
				<view class="myorder_tfl">兑换日期：{{item.time}}</view>
				<view class="myorder_tfr">{{item.status==1?'已发货':'未发货'}}</view>
			</view>
			<view class="myorder_ct border0">
				<view class="pro_dl">
					<view class="pro_dt">
						<image :src="item.image" mode="aspectFill"></image>
					</view>
					<view class="pro_dd">
						<view class="pro_title">{{item.name}}</view>
						<view class="pro_price">{{item.point}}积分</view>
					</view>
				</view>
			</view>
		</view>


	</view>
</template>

<script>
	import API from "@/common/api.js";
	export default {
		data() {
			return {
				rows: []
			}
		},
		onLoad(options) {
			var $this = this
			API.post("product/records").then((res) => {
				if (res.code == 1) {
					$this.rows = res.data
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	page {
		background: #f7f7f7;
	}

	.container {
		padding: 0 0 40rpx;
	}

	.myorder_no {
		width: 100%;
		overflow: hidden;
		margin-top: 150rpx;
		text-align: center;
		color: #999;
	}

	.myorder_list {
		padding: 20rpx 30rpx;
		overflow: hidden;
		background: #fff;
		margin: 0 0 24rpx;
		box-sizing: border-box;
	}

	.myorder_ct {
		padding: 16rpx 0;
		width: 100%;
		overflow: hidden;
		box-sizing: border-box;
	}

	.myorder_tfl {
		color: #666;
		float: left;
		font-size: 26rpx;
		line-height: 40rpx;
	}

	.myorder_tfr {
		float: right;
		color: $color;
		font-size: 30rpx;
		font-weight: bold;
		line-height: 40rpx;
	}

	.pro_dl {
		width: 100%;
		overflow: hidden;
		margin-bottom: 30rpx;
	}

	.pro_dl:last-child {
		margin-bottom: 0;
	}

	.pro_dt {
		width: 160rpx;
		height: 160rpx;
		border-radius: 10rpx;
		overflow: hidden;
		display: flex;
		justify-content: center;
		align-items: Center;
		float: left;
	}

	.pro_dt image {
		width: 100%;
		height: 100%;
		border-radius: 10rpx;
	}

	.pro_dd {
		padding-left: 210rpx;
	}

	.pro_title {
		line-height: 44rpx;
		font-size: 30rpx;
		font-weight: bold;
		overflow: hidden;
	}

	.pro_price {
		font-size: 30rpx;
		margin-top: 30rpx;
		color: #ff6600;
	}

	/* #ifdef H5 */
	.myorder_top {
		top: 0;
	}

	/* #endif */
</style>